var myApp = angular.module ('fs.waf');
//这里要注意directive命名规则  驼峰转 "-"
myApp.directive ('outerDemo2', function () {
  return {
    restrict: 'E',
    // replace: true,
    templateUrl: './testDirective/demo2/outer.html',
    transclude: true,
    scope: {},
    controller: function ($scope) {
      this.say = function (someDirective) {
        console.log ('Got:' + someDirective.message);
      };
    },
  };
});

myApp.directive ('innerDemo2', function () {
  return {
    restrict: 'E',
    // replace: true,
    templateUrl: './testDirective/demo2/inner.html',
    scope: {},
    require: '^outerDemo2',
    link: function (scope, elem, attrs, outerDemo2) {
      scope.message = 'Hi,leifeng';
      outerDemo2.say (scope);
    },
  };
});
